package cn.lefull.controller;

import cn.lefull.config.HandleField;
import cn.lefull.config.TestAop;
import cn.lefull.entity.Apartment;
import cn.lefull.exception.BusinessException;
import io.swagger.annotations.ApiOperation;
import org.springframework.context.annotation.Scope;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @auther: qijiang
 * @date: 2018/12/26 10:40
 */

@RestController
@TestAop
//多例
//@Scope(value = "prototype")
public class TestController {

    private int a = 1;
    private static int b = 1;


    @GetMapping(value = "/test")
    public String test(){
        return "true";
    }
    //@TestAop
    @ApiOperation(value = "【戚江】测试入参拦截", notes = "测试入参拦截")
    @GetMapping(value = "/test1")
    public String test1(Apartment apartment){
        System.out.println("执行方法");
        String a ="";
        return "1";
    }
    //@TestAop
    @ApiOperation(value = "【戚江】测试入参拦截", notes = "测试入参拦截")
    @PostMapping(value = "/testPost1")
    public String testPost1(Apartment apartment){
        String a ="";
        return "1";
    }
}
